@jdultra/threedtiles 3.0.1 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.html +3 -3
- package/package.json +1 -1
- package/src/decoder/B3DMDecoder.js +36 -8
- package/src/decoder/LegacyGLTFLoader.js +3 -1
- package/src/draco/draco_decoder.js +48 -0
- package/src/draco/draco_decoder.wasm +0 -0
- package/src/draco/draco_encoder.js +33 -0
- package/src/draco/draco_wasm_wrapper.js +104 -0
- package/src/geometry/obb.js +4 -4
- package/src/index.js +29 -18
- package/src/tileset/OGC3DTile.js +8 -7
- package/castle/2/20a6f49b-048f-4077-a89c-1024529e55c7.json +0 -1
- package/castle/2/26378d57-bfa4-4d6f-8346-39edd1866625.json +0 -1
- package/castle/2/2b941c63-d607-4302-bdd8-c89fcf98d055.json +0 -1
- package/castle/2/81bb208b-6029-4de2-ac2d-d49768f199c1.json +0 -1
- package/castle/2/c2ba155e-af60-4cc2-9977-77916b68ac77.json +0 -1
- package/castle/2/ecc51654-873b-45aa-96e2-6ec259e86025.json +0 -1
- package/castle/2/f0863e67-2a12-4465-b07e-fd313aca4897.json +0 -1
- package/castle/3/5240d5b6-a7c7-44f0-ae46-8c9e40d8c90d.json +0 -1
- package/castle/3/5ae0c5c3-a53f-4e04-852a-72a755352d31.json +0 -1
- package/castle/3/739e4445-f307-4d97-92db-7c37b495be58.json +0 -1
- package/castle/3/88c28d0b-3596-459f-ad53-de65f8f67a60.json +0 -1
- package/castle/3/953d305b-a2e1-4852-887b-1d8788166e9f.json +0 -1
- package/castle/3/a3150c23-150e-48d1-94e2-859e2f950ff0.json +0 -1
- package/castle/3/bef3dc2a-51ea-4861-a248-ac8511b845ff.json +0 -1
- package/castle/3/ce66f98b-db80-4938-a725-9da735a0adae.json +0 -1
- package/castle/3/ea9cb03b-acf9-4025-9907-6cc78c982a65.json +0 -1
- package/castle/3/eeb7fccc-433d-4018-a0ae-fd093a41ef8a.json +0 -1
- package/castle/3/f3172881-180f-48f5-ab3d-efc21610f1d7.json +0 -1
- package/castle/4/0f736108-ca59-4762-91d5-e3d66dbb37ce.json +0 -1
- package/castle/4/1addd247-deda-48a4-b4c6-78764ff4841d.json +0 -1
- package/castle/4/1cdaa842-d3c5-41c6-9efb-249f6a5bad4f.json +0 -1
- package/castle/4/21910ff9-a8ea-4fbb-a370-abcdc90ab740.json +0 -1
- package/castle/4/2b148e05-fae9-47cc-968d-0c19544324fe.json +0 -1
- package/castle/4/2caaf492-3056-4e17-8876-31065ff49edc.json +0 -1
- package/castle/4/3ec1c331-1c13-4302-b1d5-40de62945a85.json +0 -1
- package/castle/4/6126337a-4036-4615-a394-d1e79941b21d.json +0 -1
- package/castle/4/648255c5-c1bd-4419-a79e-5f6972d2255b.json +0 -1
- package/castle/4/7395529d-b1f6-4ee5-9e18-c6be5046e4d9.json +0 -1
- package/castle/4/846d27ab-ae4c-48b2-91a6-240e665fccbd.json +0 -1
- package/castle/4/8c8c29b8-cc2c-4faf-9bed-0f6698d6d227.json +0 -1
- package/castle/4/971043e6-0369-48d9-a44d-3ab27346af86.json +0 -1
- package/castle/4/cce1bfc6-eb86-473a-8f58-dc96fabe7104.json +0 -1
- package/castle/4/cdadf7d9-bb9f-43f7-be63-b7553d8c821f.json +0 -1
- package/castle/4/e382aff3-965c-424f-863e-d6858ef0b2d4.json +0 -1
- package/castle/4/fd37edc0-4b19-4283-b753-e8eaa9781b1e.json +0 -1
- package/castle/5/075c390d-77c4-4601-a72b-603d63297e4e.json +0 -1
- package/castle/5/141b037b-e39f-416b-a465-1785cc35bc88.json +0 -1
- package/castle/5/14818b89-f589-4762-a372-a5499b3d9e32.json +0 -1
- package/castle/5/2995a382-53da-4fb4-8285-1462d51ccfa9.json +0 -1
- package/castle/5/2efa4e7f-f9b2-4825-aac6-d6da33fab444.json +0 -1
- package/castle/5/4fe137d9-a38c-41e6-8f3f-13b98ab6f041.json +0 -1
- package/castle/5/6a1d9a5a-0079-4381-888a-2c043c084464.json +0 -1
- package/castle/5/8579ff1e-90d5-4e11-afca-28faf5ecff7a.json +0 -1
- package/castle/5/86984772-b72e-4a37-9ad7-71084e4faaa7.json +0 -1
- package/castle/5/892c8d1f-8ec3-4c29-ae07-b4d0d304a635.json +0 -1
- package/castle/5/8c842529-852b-4890-9bac-ffd93dba87e8.json +0 -1
- package/castle/5/98db5168-eccf-4e40-b933-2de8e0f26e5e.json +0 -1
- package/castle/5/99991e0f-85be-460d-9aad-74082ce25b66.json +0 -1
- package/castle/5/ad17dfb9-1a52-40b2-9489-9b50deff8d41.json +0 -1
- package/castle/5/b4c570c3-4fc5-4032-913b-8e53451919d3.json +0 -1
- package/castle/5/c99b9302-c037-44f3-80af-a19120de26d9.json +0 -1
- package/castle/5/cb649fa0-6310-4cf3-b5a9-06107ad0a74d.json +0 -1
- package/castle/5/d0ea47e4-7945-41a9-b932-4e639565bb8b.json +0 -1
- package/castle/5/dda9f378-6163-4b46-abde-7bf43ac48c10.json +0 -1
- package/castle/5/e81fa876-c2ee-4ef7-aeec-77a413c83bb0.json +0 -1
- package/castle/5/e82d5a1f-3a36-4a8b-92ef-4af982160f98.json +0 -1
- package/castle/6/00cb8833-f79c-4ef0-aaa9-85d09b17f14c.json +0 -1
- package/castle/6/060b02d7-696d-4fd0-b926-575d0a1e1e5e.json +0 -1
- package/castle/6/161908d4-0400-4f9e-a89c-569018f008e7.json +0 -1
- package/castle/6/1a5b7403-fa2e-4c45-960c-fc9420be7c95.json +0 -1
- package/castle/6/31f7a69f-480d-4065-99d2-741fcda19401.json +0 -1
- package/castle/6/39c319db-f729-4712-b1bc-b034d4b8c443.json +0 -1
- package/castle/6/39d328d6-bc46-40ca-b8fe-8ec461a53b41.json +0 -1
- package/castle/6/3c12ccd4-2f8c-47be-a419-b56e9db99c6f.json +0 -1
- package/castle/6/43e2a766-c59f-461a-86fa-4b0fb84385fd.json +0 -1
- package/castle/6/441a34d0-1da5-40a6-acbd-ec37b2ac88ec.json +0 -1
- package/castle/6/4bc9a599-b581-4469-b503-1567ae3337d9.json +0 -1
- package/castle/6/51d3b1b7-6db5-4274-8969-50eb6ff2f83f.json +0 -1
- package/castle/6/53dc220b-fae4-43b1-bd73-22df6bc5bf91.json +0 -1
- package/castle/6/5ffa2e95-8a87-403b-ba12-9bf267388928.json +0 -1
- package/castle/6/61b1dc9e-34a8-4ae6-b9d7-0de5fc398c56.json +0 -1
- package/castle/6/66205281-e001-4489-977f-e61065d78e28.json +0 -1
- package/castle/6/6b5fca97-fa07-4bb0-b537-2a1e77571856.json +0 -1
- package/castle/6/725e6961-1995-4672-8c9b-579b3597f27e.json +0 -1
- package/castle/6/771f0da4-5bb7-432c-8d76-5e9e1f3c0833.json +0 -1
- package/castle/6/85dbaad2-12cd-4d33-b93a-04cbeff3ea0f.json +0 -1
- package/castle/6/88d362b2-9f1f-4d82-b210-2f54930b96a1.json +0 -1
- package/castle/6/9580ee51-582c-430e-99bd-9e4b55a63153.json +0 -1
- package/castle/6/a43c1c62-4f08-40b2-bb95-8e3e6d40fdcc.json +0 -1
- package/castle/6/b7fbd22c-025d-4885-83eb-55455474ba8b.json +0 -1
- package/castle/6/ba0c1ead-7261-41a4-884a-151dd34f7acb.json +0 -1
- package/castle/6/c2d65822-1985-45a2-9370-226296bc9357.json +0 -1
- package/castle/6/d3b0166d-dced-4d2d-9278-9aeffc463d2f.json +0 -1
- package/castle/6/d93d5441-fd35-491d-8627-c2399d317e0e.json +0 -1
- package/castle/6/de0da61a-5fa3-4433-a9e6-4b96a561af70.json +0 -1
- package/castle/6/f2b1bfec-45e5-443c-8291-a6e86389668b.json +0 -1
- package/castle/6/f6f1b909-190a-4924-8fe5-a056d1672386.json +0 -1
- package/castle/6/f73c1d7c-25ed-447d-b6d5-64cff4c91724.json +0 -1
- package/castle/6/fde32c3c-9d91-4894-a09f-629ca811d32b.json +0 -1
- package/castle/7/070c50f7-2247-472a-a760-cea23f34e319.json +0 -1
- package/castle/7/0d8c223b-b006-4022-b371-6290390ed348.json +0 -1
- package/castle/7/0e58a413-619a-4540-bed5-d91c214fabcd.json +0 -1
- package/castle/7/1f75f884-9838-46d9-b9c9-fca0ce15d1ee.json +0 -1
- package/castle/7/325594e4-0e34-4df6-8ad0-32ffaecc0d4b.json +0 -1
- package/castle/7/4e223015-fb83-4c89-8808-73ee76cba0d1.json +0 -1
- package/castle/7/5921ddc0-aff4-44e2-a1c5-b6207a43046c.json +0 -1
- package/castle/7/5e215238-5d90-4a18-9f1a-4bedf57a1f27.json +0 -1
- package/castle/7/5ea00d24-8414-4540-8111-a5980c73d89f.json +0 -1
- package/castle/7/79881984-590d-406f-81e8-2f6e1eb49800.json +0 -1
- package/castle/7/79c39ce4-77a1-48b7-bb3c-21655220ea1e.json +0 -1
- package/castle/7/8501068b-17dd-4338-b713-1e1be3c09c34.json +0 -1
- package/castle/tileset.json +0 -1
- package/castleX/2/0edf8db5-53c8-419c-954d-4b550b0c7da8.json +0 -1
- package/castleX/2/43bd23d8-5305-431e-8dc9-0cb472b5b1cc.json +0 -1
- package/castleX/2/64eae425-4294-4049-a34f-80d8b25e8ef2.json +0 -1
- package/castleX/2/91774eb9-04dc-4272-bc39-b706bf18e394.json +0 -1
- package/castleX/2/ad2b09b4-67f6-46db-a0cc-2275332e3a67.json +0 -1
- package/castleX/2/c9e0d658-6fee-46a5-8c48-879db8deeca2.json +0 -1
- package/castleX/2/dc8ad981-b3fc-4598-8437-76f30a45d012.json +0 -1
- package/castleX/3/1e264caf-6d73-4292-8117-1caf855e3262.json +0 -1
- package/castleX/3/3da16a84-f23a-4cb8-aecd-4c4540df9f2e.json +0 -1
- package/castleX/3/40dcb464-242c-47e9-82c0-a7292ce6902a.json +0 -1
- package/castleX/3/92f9cce2-a20e-498d-98d4-d8a741aaafc2.json +0 -1
- package/castleX/3/a3a5bcf6-efe0-4e4e-978e-8e36a8f7933f.json +0 -1
- package/castleX/3/ba9979d0-a12e-44f7-b3df-4a197a861c90.json +0 -1
- package/castleX/3/bc90ef82-98f0-4cab-85c0-6c1eb60c7684.json +0 -1
- package/castleX/3/e1ea24cd-7de3-43bc-a246-e01517aa2df5.json +0 -1
- package/castleX/3/e4d7317e-d890-4081-bc78-6f7d70387408.json +0 -1
- package/castleX/3/ef7562fa-fd3d-4183-9f0f-1dc12fb38393.json +0 -1
- package/castleX/3/fc4394ed-e12a-4f3a-8057-344e797dbdb5.json +0 -1
- package/castleX/3/fd6a65fa-3096-40d6-b5fd-1d88ff7dd56c.json +0 -1
- package/castleX/4/03073fdf-c4b6-43ee-9b81-bb366863d162.json +0 -1
- package/castleX/4/1206afde-8a12-45fc-8a9a-954b7e780d83.json +0 -1
- package/castleX/4/2d143008-30ce-4917-8181-50a9fc3ea14e.json +0 -1
- package/castleX/4/2e11256b-4bf2-455f-be85-ebf73c12d6c9.json +0 -1
- package/castleX/4/43898882-7769-4d00-8e7a-c99c64c0380c.json +0 -1
- package/castleX/4/4b8527fb-73e8-47cc-b013-03b453c0ef00.json +0 -1
- package/castleX/4/4d517f6b-8b19-4c1a-b4f6-c2e1ec3f1f81.json +0 -1
- package/castleX/4/7bc1c485-5651-4082-8523-839746d5e2fb.json +0 -1
- package/castleX/4/84d412d3-d097-49c5-9de7-678de354486c.json +0 -1
- package/castleX/4/86c5cc4a-8da8-4dd0-863b-02e71a8c50d4.json +0 -1
- package/castleX/4/87fe18a5-df39-43c2-a174-d4e18b8a8737.json +0 -1
- package/castleX/4/b33afb2a-d401-48c9-becd-fc3857fa0868.json +0 -1
- package/castleX/4/cbb74aa0-e834-47d9-b520-41b0c48b2cfd.json +0 -1
- package/castleX/4/cffbaeea-2307-4dde-b142-f72c090a426f.json +0 -1
- package/castleX/4/d685b8d5-ac9d-43b6-abee-87d697324e53.json +0 -1
- package/castleX/4/ecf0238f-80cb-43fe-99da-6f6fbe436c30.json +0 -1
- package/castleX/4/fc780db4-8a14-4fb5-9acf-7deac337c848.json +0 -1
- package/castleX/5/2f439cac-6768-4f1a-807e-2762fa68ccf1.json +0 -1
- package/castleX/5/419020b8-2f24-41bb-a193-4ecce31ae65f.json +0 -1
- package/castleX/5/4741e6b4-03ad-4ea2-8008-4f42ffc010ca.json +0 -1
- package/castleX/5/4b6839cc-732d-461f-83a0-81d954519c35.json +0 -1
- package/castleX/5/4f48cd7f-ccbf-4af3-b80f-b19d2abb08b4.json +0 -1
- package/castleX/5/5e1d7cbe-d20d-40d2-869d-68f37594b5b6.json +0 -1
- package/castleX/5/61e10769-1ac7-4e4b-981a-7b8fb49eb463.json +0 -1
- package/castleX/5/64defb19-6cff-4783-a259-afd9ffc3ab26.json +0 -1
- package/castleX/5/73e5e5bd-b3de-4afa-85d6-5780c80d0e58.json +0 -1
- package/castleX/5/779512a6-58df-4bbb-8656-204fe2779e4b.json +0 -1
- package/castleX/5/7a9e8d39-724e-44fc-813d-670adb18158f.json +0 -1
- package/castleX/5/8bc53b71-d0a7-43ec-b62e-a1d328ddba5b.json +0 -1
- package/castleX/5/9652b741-f885-4d04-ab80-88a6ca7780b2.json +0 -1
- package/castleX/5/96b3dc0d-c484-4a7c-a0ad-17b0960c183a.json +0 -1
- package/castleX/5/9f98b525-a36d-480e-a8a2-48cc923b26da.json +0 -1
- package/castleX/5/a0eb3427-d8d4-4464-b603-9e8d5f833736.json +0 -1
- package/castleX/5/a8225ce9-b4b9-4a83-a68a-c84e74325e0f.json +0 -1
- package/castleX/5/adafadbf-08e9-4e99-909c-5a523050046e.json +0 -1
- package/castleX/5/b1b09dc1-02bc-4115-9820-eaef9a873562.json +0 -1
- package/castleX/5/b1ccd9a6-1c22-4105-979a-a9fa1afd21e0.json +0 -1
- package/castleX/5/d9b769da-e44a-4f74-8752-a845b0e05e49.json +0 -1
- package/castleX/6/0b6b5bf8-0077-4bc5-94c1-e400549e483c.json +0 -1
- package/castleX/6/11120914-c5b1-4453-9e2b-6bc306742c2d.json +0 -1
- package/castleX/6/124c6fcf-0862-466d-bd5b-7f0d63835e0f.json +0 -1
- package/castleX/6/155a8079-143a-453e-bb39-70b5b97d7002.json +0 -1
- package/castleX/6/158752ca-5991-4c17-906a-3caced1e609d.json +0 -1
- package/castleX/6/3f85b349-933b-4862-a377-a0b3165f24ea.json +0 -1
- package/castleX/6/4462f40b-a195-41d5-ba32-4e4914d4f0da.json +0 -1
- package/castleX/6/47332b91-87f7-4405-bcda-427a61af2fbd.json +0 -1
- package/castleX/6/50abfa7d-ecd4-4047-b623-a6b2bc4c8974.json +0 -1
- package/castleX/6/5af71026-87aa-46c2-b3d4-c70dc174294a.json +0 -1
- package/castleX/6/6224e6dc-afd8-4948-a14c-8cff562041bf.json +0 -1
- package/castleX/6/67713c61-21a5-40b8-a62f-a95e5ced47e7.json +0 -1
- package/castleX/6/685323be-3067-4cea-afae-921cb1d16b3c.json +0 -1
- package/castleX/6/70975550-0c76-4d17-9423-319474d33a79.json +0 -1
- package/castleX/6/7377af87-fc91-474f-8401-b0e527faf92a.json +0 -1
- package/castleX/6/7384fd0e-d4d9-4dfc-a868-e40de558e5a3.json +0 -1
- package/castleX/6/7e46420b-5e95-4ba8-8bbe-e09367de8872.json +0 -1
- package/castleX/6/8cb396a7-2e4f-4b94-b317-1dc72ee23bf9.json +0 -1
- package/castleX/6/920c5f9a-9e8b-4cc8-b7bc-e4649e7fc0d2.json +0 -1
- package/castleX/6/9307e5f2-9cd0-408d-8d49-44cd222028d3.json +0 -1
- package/castleX/6/a8c53491-4f25-4f52-8526-e03d743d3745.json +0 -1
- package/castleX/6/abe88892-e988-4eb1-8d7f-84c16bfc59bb.json +0 -1
- package/castleX/6/ad1512c4-1373-42fb-8bf6-98db933ea288.json +0 -1
- package/castleX/6/b12ac6f3-8c0f-4c17-9285-54e695751cd9.json +0 -1
- package/castleX/6/b7e676f4-b8b6-44ad-aa08-ec87a5a27fea.json +0 -1
- package/castleX/6/bd1ec666-1f84-41b8-aa15-9814dccf9624.json +0 -1
- package/castleX/6/c47ac9a0-8556-4d95-90c5-ce7f2e746297.json +0 -1
- package/castleX/6/dba1c966-e460-4b00-ad63-a72344f76787.json +0 -1
- package/castleX/6/e5528e33-e639-483e-b050-536b9bfc718e.json +0 -1
- package/castleX/6/e7249bed-fec0-498f-b63f-b33b3efd1d0d.json +0 -1
- package/castleX/6/f456c2ba-5f29-4415-8b5b-088ea7aca05f.json +0 -1
- package/castleX/6/f796f44b-943b-4d71-b1d4-5a77faa3b824.json +0 -1
- package/castleX/6/fd2e46a0-8876-46f1-97bb-e1f4297a6e4f.json +0 -1
- package/castleX/7/232ebfc7-1b1e-4591-bb95-594701e8c500.json +0 -1
- package/castleX/7/3ad3b6a4-a4f2-424b-8dca-e6a08c275775.json +0 -1
- package/castleX/7/3d0184b0-7ca8-47a5-9019-557f81c7bbb4.json +0 -1
- package/castleX/7/875597ad-1dec-4669-9c43-a1fa6dc1891b.json +0 -1
- package/castleX/7/92310023-be56-4bff-99a5-6fb5689db285.json +0 -1
- package/castleX/7/ac77fed3-d568-4d9e-b446-e8a42489fe97.json +0 -1
- package/castleX/7/b31876f0-34eb-43d8-935e-314acebcf0f7.json +0 -1
- package/castleX/7/ba7be262-a8f0-4d44-bfbf-3a728edfa7f3.json +0 -1
- package/castleX/7/d5d05427-44d0-4452-96f9-e4f5e4eb4b7f.json +0 -1
- package/castleX/7/da851970-20a8-437f-8c1a-ad7929cccc2f.json +0 -1
- package/castleX/7/e323b9d6-7206-436a-9f35-c5248a807538.json +0 -1
- package/castleX/7/e8d72652-cefd-431c-904e-645c18ed2789.json +0 -1
- package/castleX/tileset.json +0 -1
- package/qingxie/Tile_+005_+006/tileset.json +0 -1000
- package/qingxie/Tile_+005_+007/tileset.json +0 -1000
- package/qingxie/Tile_+005_+008/tileset.json +0 -1000
- package/qingxie/Tile_+006_+006/tileset.json +0 -1096
- package/qingxie/Tile_+006_+007/tileset.json +0 -1000
- package/qingxie/Tile_+006_+008/tileset.json +0 -1048
- package/qingxie/Tile_+007_+006/tileset.json +0 -1000
- package/qingxie/Tile_+007_+007/tileset.json +0 -1169
- package/qingxie/Tile_+007_+008/tileset.json +0 -1000
- package/qingxie/Tile_+008_+006/tileset.json +0 -1048
- package/qingxie/Tile_+008_+007/tileset.json +0 -1169
- package/qingxie/Tile_+008_+008/tileset.json +0 -1048
- package/qingxie/Tile_+009_+006/tileset.json +0 -1096
- package/qingxie/Tile_+009_+007/tileset.json +0 -1000
- package/qingxie/Tile_+009_+008/tileset.json +0 -1071
- package/qingxie/Tile_+010_+006/tileset.json +0 -1000
- package/qingxie/Tile_+010_+007/tileset.json +0 -1000
- package/qingxie/Tile_+010_+008/tileset.json +0 -1000
- package/qingxie/tileset.json +0 -461
- package/yamato/3/545b08dd-edf2-4294-8660-e2958682d1a5.json +0 -1
- package/yamato/4/51b12995-b88e-4ff0-a528-f3b79422e3f7.json +0 -1
- package/yamato/4/6cb21042-c310-4345-85cf-028831d659b4.json +0 -1
- package/yamato/5/b529e320-28d8-4d60-9272-c3b3e68f1eeb.json +0 -1
- package/yamato/5/cc536550-5f40-4bda-9951-adde01a49395.json +0 -1
- package/yamato/tileset.json +0 -1
package/README.md
CHANGED
|
@@ -93,6 +93,6 @@ I'll soon add a layer for 3DTiles.
|
|
|
93
93
|
# Mesh to 3DTiles Converter
|
|
94
94
|
|
|
95
95
|
I also have code to convert meshes to 3DTiles with no limit to the size of the dataset relative to faces or textures.
|
|
96
|
-
It works for all types of meshes.
|
|
96
|
+
It works for all types of meshes: photogrametry, BIM, colored or textured meshes with a single texture atlas or many individual textures.
|
|
97
97
|
I'm keeping the code private for now but I'll convert any dataset you have for free.
|
|
98
98
|
Contact: emericbeaufays@gmail.com
|
package/index.html
CHANGED
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
<input type="range" min="0.1" max="4" value="1.0", step="0.1" class="slider" id="lodMultiplier" >
|
|
52
52
|
<p style="color: #0439aa;">LOD multiplier: <span id="multiplierValue"></span></p>
|
|
53
53
|
</div>
|
|
54
|
-
<div style="position: absolute; bottom: 1%; z-index: 100;">
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
<div style="position: absolute; bottom: 1%; z-index: 100;">
|
|
55
|
+
<a href="https://openheritage3d.org/project.php?id=taz6-n215">ORIGINAL MODEL</a>
|
|
56
|
+
</div>
|
|
57
57
|
</body>
|
|
58
58
|
|
|
59
59
|
</html>
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
|
|
2
4
|
import { LegacyGLTFLoader } from './LegacyGLTFLoader.js';
|
|
3
5
|
import { Color, DoubleSide, BufferAttribute, Mesh } from "three";
|
|
4
6
|
import { BufferGeometryUtils } from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
5
7
|
|
|
6
8
|
const gltfLoader = new GLTFLoader();
|
|
9
|
+
const dracoLoader = new DRACOLoader();
|
|
10
|
+
dracoLoader.setDecoderPath( '/src/draco/' );
|
|
11
|
+
gltfLoader.setDRACOLoader( dracoLoader );
|
|
7
12
|
const legacyGLTFLoader = new LegacyGLTFLoader();
|
|
8
13
|
const B3DMDecoder = {
|
|
9
14
|
parseB3DM: (arrayBuffer, meshCallback) => {
|
|
@@ -51,8 +56,8 @@ const B3DMDecoder = {
|
|
|
51
56
|
//model.scene.batchTable = b3dm.batchTable;
|
|
52
57
|
//model.scene.featureTable = b3dm.featureTable;
|
|
53
58
|
|
|
54
|
-
const scene = mergeColoredObject(model.scene);
|
|
55
|
-
scene.traverse((o) => {
|
|
59
|
+
//const scene = mergeColoredObject(model.scene);
|
|
60
|
+
model.scene.traverse((o) => {
|
|
56
61
|
if (o.isMesh) {
|
|
57
62
|
if (!!meshCallback) {
|
|
58
63
|
meshCallback(o);
|
|
@@ -60,23 +65,43 @@ const B3DMDecoder = {
|
|
|
60
65
|
|
|
61
66
|
}
|
|
62
67
|
});
|
|
63
|
-
resolve(scene);
|
|
68
|
+
resolve(model.scene);
|
|
64
69
|
}, error=>{
|
|
65
|
-
|
|
66
|
-
|
|
70
|
+
legacyGLTFLoader.parse(gltfBuffer, model => {
|
|
71
|
+
|
|
72
|
+
////TODO
|
|
73
|
+
//model.batchTable = b3dm.batchTable;
|
|
74
|
+
//model.featureTable = b3dm.featureTable;
|
|
75
|
+
|
|
76
|
+
//model.scene.batchTable = b3dm.batchTable;
|
|
77
|
+
//model.scene.featureTable = b3dm.featureTable;
|
|
78
|
+
|
|
79
|
+
//const scene = mergeColoredObject(model.scene);
|
|
80
|
+
model.scene.traverse((o) => {
|
|
81
|
+
if (o.isMesh) {
|
|
82
|
+
if (!!meshCallback) {
|
|
83
|
+
meshCallback(o);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
resolve(model.scene);
|
|
89
|
+
}, null);
|
|
67
90
|
});
|
|
68
91
|
});
|
|
69
92
|
}
|
|
70
93
|
}
|
|
71
94
|
|
|
72
95
|
/**
|
|
96
|
+
* //TODO find something else than this workaround
|
|
97
|
+
*
|
|
73
98
|
* Because B3DM doesn't support colored faces, they are usually encoded as separate meshes each one with a global color.
|
|
74
99
|
* However, when a mesh has many different face colors, this becomes very inneficient.
|
|
75
100
|
* This method doesn't fix the slow decoding of the GLTFLoader but at least merges meshes together and transfers the face color to vertex color
|
|
76
101
|
* which is much more efficient at render time.
|
|
77
102
|
* Textured meshes with the same texture are also merged and color is discarded
|
|
78
103
|
*
|
|
79
|
-
*
|
|
104
|
+
* Big assumption! all the meshes are assumed to have the same transformation matrix
|
|
80
105
|
*
|
|
81
106
|
* @param {*} scene
|
|
82
107
|
* @returns
|
|
@@ -141,6 +166,7 @@ function mergeColoredObject(scene) {
|
|
|
141
166
|
if(fullColoredGeometriesToMerge.length>0){
|
|
142
167
|
let mergedColoredGeometry = BufferGeometryUtils.mergeBufferGeometries(fullColoredGeometriesToMerge, false);
|
|
143
168
|
mergedColoredMesh = new Mesh(mergedColoredGeometry, coloredMeshMaterial);
|
|
169
|
+
//mergedColoredMesh.matrix = matrix;
|
|
144
170
|
for (const color in coloredMeshes) {
|
|
145
171
|
if (coloredMeshes.hasOwnProperty(color)) {
|
|
146
172
|
coloredMeshes[color].forEach(mesh => {
|
|
@@ -171,7 +197,9 @@ function mergeColoredObject(scene) {
|
|
|
171
197
|
});
|
|
172
198
|
|
|
173
199
|
const mergedGeometry = BufferGeometryUtils.mergeBufferGeometries(geometries, false);
|
|
174
|
-
|
|
200
|
+
const mesh = new Mesh(mergedGeometry, material);
|
|
201
|
+
//mesh.matrix = matrix;
|
|
202
|
+
mergedTexturedMeshes.push(mesh);
|
|
175
203
|
texturedMeshes[map].forEach(mesh => {
|
|
176
204
|
mesh.material.dispose();
|
|
177
205
|
mesh.geometry.dispose();
|
|
@@ -183,7 +211,7 @@ function mergeColoredObject(scene) {
|
|
|
183
211
|
if(!!mergedColoredMesh) scene.add(mergedColoredMesh);
|
|
184
212
|
mergedTexturedMeshes.forEach(mesh=>scene.add(mesh));
|
|
185
213
|
console.log();
|
|
186
|
-
|
|
214
|
+
scene.matrix = new THREE.Matrix4();
|
|
187
215
|
return scene;
|
|
188
216
|
}
|
|
189
217
|
|
|
@@ -431,6 +431,7 @@ const LegacyGLTFLoader = ( function () {
|
|
|
431
431
|
var WEBGL_TYPE = {
|
|
432
432
|
5126: Number,
|
|
433
433
|
//35674: THREE.Matrix2,
|
|
434
|
+
35670: Boolean,
|
|
434
435
|
35675: THREE.Matrix3,
|
|
435
436
|
35676: THREE.Matrix4,
|
|
436
437
|
35664: THREE.Vector2,
|
|
@@ -1099,7 +1100,8 @@ const LegacyGLTFLoader = ( function () {
|
|
|
1099
1100
|
|
|
1100
1101
|
}
|
|
1101
1102
|
|
|
1102
|
-
var textureLoader = THREE.Loader.Handlers.get( sourceUri );
|
|
1103
|
+
//var textureLoader = THREE.Loader.Handlers.get( sourceUri );
|
|
1104
|
+
var textureLoader = THREE.DefaultLoadingManager.getHandler( sourceUri);
|
|
1103
1105
|
|
|
1104
1106
|
if ( textureLoader === null ) {
|
|
1105
1107
|
|