topview-3d-cli 0.1.0__py3-none-any.whl
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.
- topview_3d_cli/__init__.py +3 -0
- topview_3d_cli/__main__.py +5 -0
- topview_3d_cli/_runtime/builtin-assets/LICENSE +396 -0
- topview_3d_cli/_runtime/builtin-assets/NOTICE +24 -0
- topview_3d_cli/_runtime/builtin-assets/characters/a3d_char_30ec53c93eae4173946b38639691ebe0.glb +0 -0
- topview_3d_cli/_runtime/builtin-assets/characters/a3d_char_461b4f4b76ae4b198f439fa4f6f743b6.glb +0 -0
- topview_3d_cli/_runtime/builtin-assets/characters/a3d_char_7d220ac359844c80a8faaf0e25478477.glb +0 -0
- topview_3d_cli/_runtime/builtin-assets/characters/a3d_char_de37873a79244fbe8a0660ea08d1b4ab.glb +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-attack-jab.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-attack-lunge.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-attack-rear.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-crawling-forward-reaching-with-le.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-exaggerated-punch-with-right-hand.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-examine-fwd.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-holding-bow.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-jab-with-right-hand.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-on-hands-and-toes-right-leg-forwa.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-on-right-leg.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-push-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-pushing-backwards.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-pushing-with-both-hands.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-pushing-with-left-side-of-body.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_action-sliding.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-arms-spread-looking-upwards.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-examine-fwd.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-lean-fwd-right-hand-supporting.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-leaning-against-object-look-l.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-look-back.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-look-down-back.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-look-fwd-f.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-look-fwd-m.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-on-knees-arms-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_crouch-sneaking.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-l-toe-top-of-right-foot.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-legs-spread-lean-l.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-legs-spread-lean-r.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-legs-x.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-r-foot-arms-extended-backwards.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-r-toe-arms-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-r-toe-l-leg-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-toes-arch.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dance-toes-reach.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-floating-bent-forwards.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-floating-left-leg-bent-hands-spread.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-floating-legs-bent-and-arms-spread.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-floating-legs-raised-arms-extended-u.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-l-toe-look-l.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dyn-leaping-forward-arms-extended-backwa.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dynamic-float-arch.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_dynamic-float-dive.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-back-arched-arms-supp.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-legs-to-side-arms-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-legs-x-arms-supp.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-back-left-leg-bent-hands-head.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-back-left-leg-bent.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-back-legs-x-hands-head.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-left-side-left-arm-supporting-hea.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-left-side-left-arm-supporting.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-right-side-right-arm-supporting.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-right-side-right-hand-supporting.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-on-stomach-elbows-supporting.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-right-arm-supporting-l-arm-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_lay-right-leg-forward-arms-supp.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-run-fwd.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-run-reach.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-sneaking-forward.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-sprinting.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-stepping-forward-look-l.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walk-fwd-look-r.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walk-fwd.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walking-arms-on-hips.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walking-right-arm-on-hip.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_loco-walking.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-holding-left-knee-reclining.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-holding-right-knee.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-resting-on-knees.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-supp.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-arms-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-elbows-on-legs-lean-fwd.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-elbows-on-legs-lean-l.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-knees-up-hold.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-lean-back-arms-supp.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-lean-fwd-elbows-on-knees.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-lean-fwd-hands-in-front.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-arms-x.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-hands-head.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-hold.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-reclining.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-legs-x-right-arm-over-knee.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reaching-hands-towards-toes.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reaching-left-hand-towards-right-toe.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-facepalm.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-hands-head.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-left-leg-crossed-hands-head.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-left-leg-crossed.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-look-down.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-reclined-right-leg-crossed-hands-hea.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-rev-sit-hands-grasping.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_sit-rev-sit-hands-relaxed.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-arms-behind-back.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-arms-down.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-arms-slightly-spread.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-bending-forward-arms-x-over-knees.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-hands-on-hips-look-back.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-l-hip-f.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-l-hip-m.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-l-leg-r-hip-l-arm-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-lean-back-arms-behind.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-lean-back-l-hip.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-left-elbow-resting-obj.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-left-leg-obj-left-hand-on-knee-r-h.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-left-leg-obj-left-hand-on-knee.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-legs-x-arms-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-legs-x-l-hip.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-legs-x-leaning-obj.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-legs-x-left-arm-obj-r-hip.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-look-down-r.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-look-fwd.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-look-l.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-look-r.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-arm-up-l-hip.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-foot-l-leg-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-foot-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-hip-l-arm-up.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-r-hip.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-right-hand-behind-head.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-right-leg-obj-arms-x.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_stand-right-leg-obj-l-hip-right-hand-on.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/covers/a3d_pose_t-pose.webp +0 -0
- topview_3d_cli/_runtime/builtin-assets/manifest.json +2372 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-attack-jab.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-attack-lunge.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-attack-rear.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-crawling-forward-reaching-with-le.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-exaggerated-punch-with-right-hand.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-examine-fwd.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-holding-bow.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-jab-with-right-hand.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-on-hands-and-toes-right-leg-forwa.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-on-right-leg.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-push-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-pushing-backwards.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-pushing-with-both-hands.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-pushing-with-left-side-of-body.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_action-sliding.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-arms-spread-looking-upwards.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-examine-fwd.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-lean-fwd-right-hand-supporting.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-leaning-against-object-look-l.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-look-back.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-look-down-back.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-look-fwd-f.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-look-fwd-m.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-on-knees-arms-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_crouch-sneaking.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-l-toe-top-of-right-foot.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-legs-spread-lean-l.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-legs-spread-lean-r.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-legs-x.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-r-foot-arms-extended-backwards.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-r-toe-arms-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-r-toe-l-leg-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-toes-arch.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dance-toes-reach.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-floating-bent-forwards.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-floating-left-leg-bent-hands-spread.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-floating-legs-bent-and-arms-spread.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-floating-legs-raised-arms-extended-u.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-l-toe-look-l.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dyn-leaping-forward-arms-extended-backwa.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dynamic-float-arch.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_dynamic-float-dive.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-back-arched-arms-supp.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-legs-to-side-arms-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-legs-x-arms-supp.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-back-left-leg-bent-hands-head.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-back-left-leg-bent.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-back-legs-x-hands-head.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-left-side-left-arm-supporting-hea.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-left-side-left-arm-supporting.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-right-side-right-arm-supporting.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-right-side-right-hand-supporting.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-on-stomach-elbows-supporting.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-right-arm-supporting-l-arm-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_lay-right-leg-forward-arms-supp.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-run-fwd.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-run-reach.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-sneaking-forward.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-sprinting.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-stepping-forward-look-l.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walk-fwd-look-r.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walk-fwd.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walking-arms-on-hips.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walking-right-arm-on-hip.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_loco-walking.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-holding-left-knee-reclining.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-holding-right-knee.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-resting-on-knees.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-supp.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-arms-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-elbows-on-legs-lean-fwd.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-elbows-on-legs-lean-l.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-knees-up-hold.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-lean-back-arms-supp.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-lean-fwd-elbows-on-knees.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-lean-fwd-hands-in-front.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-arms-x.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-hands-head.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-hold.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-reclining.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-legs-x-right-arm-over-knee.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reaching-hands-towards-toes.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reaching-left-hand-towards-right-toe.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-facepalm.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-hands-head.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-left-leg-crossed-hands-head.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-left-leg-crossed.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-look-down.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-reclined-right-leg-crossed-hands-hea.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-rev-sit-hands-grasping.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_sit-rev-sit-hands-relaxed.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-arms-behind-back.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-arms-down.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-arms-slightly-spread.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-bending-forward-arms-x-over-knees.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-hands-on-hips-look-back.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-l-hip-f.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-l-hip-m.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-l-leg-r-hip-l-arm-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-lean-back-arms-behind.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-lean-back-l-hip.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-left-elbow-resting-obj.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-left-leg-obj-left-hand-on-knee-r-h.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-left-leg-obj-left-hand-on-knee.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-legs-x-arms-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-legs-x-l-hip.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-legs-x-leaning-obj.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-legs-x-left-arm-obj-r-hip.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-look-down-r.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-look-fwd.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-look-l.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-look-r.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-arm-up-l-hip.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-foot-l-leg-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-foot-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-hip-l-arm-up.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-r-hip.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-right-hand-behind-head.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-right-leg-obj-arms-x.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_stand-right-leg-obj-l-hip-right-hand-on.json +1 -0
- topview_3d_cli/_runtime/builtin-assets/poses/a3d_pose_t-pose.json +1 -0
- topview_3d_cli/_runtime/director-cli/applyIntent.mjs +35 -0
- topview_3d_cli/_runtime/director-cli/browser.mjs +47 -0
- topview_3d_cli/_runtime/director-cli/cli.mjs +56 -0
- topview_3d_cli/_runtime/director-cli/editSequence.mjs +125 -0
- topview_3d_cli/_runtime/director-cli/evaluate.mjs +254 -0
- topview_3d_cli/_runtime/director-cli/mediaUrl.mjs +47 -0
- topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/draco/draco_decoder.js +34 -0
- topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/draco/draco_decoder.wasm +0 -0
- topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/draco/draco_wasm_wrapper.js +117 -0
- topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/engine/index.mjs +22219 -0
- topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/evaluate/index.mjs +4229 -0
- topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/dist/headless/index.mjs +22832 -0
- topview_3d_cli/_runtime/director-cli/node_modules/@topview/3d-builder/package.json +75 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/LICENSE +21 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/build/three.core.js +59732 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/build/three.module.js +19552 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/controls/OrbitControls.js +1963 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/curves/NURBSCurve.js +155 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/curves/NURBSUtils.js +532 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/libs/draco/draco_decoder.js +34 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/libs/draco/draco_decoder.wasm +0 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/libs/draco/draco_wasm_wrapper.js +117 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/libs/fflate.module.js +2672 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/lines/LineMaterial.js +703 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/lines/LineSegments2.js +426 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js +298 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/loaders/DRACOLoader.js +739 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/loaders/FBXLoader.js +4580 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/loaders/GLTFLoader.js +4860 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/utils/BufferGeometryUtils.js +1434 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/examples/jsm/utils/SkeletonUtils.js +496 -0
- topview_3d_cli/_runtime/director-cli/node_modules/three/package.json +123 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/LICENSE +21 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/index.js +4 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/package.json +118 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/ZodError.js +133 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/errors.js +9 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/external.js +6 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/helpers/util.js +133 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/locales/en.js +109 -0
- topview_3d_cli/_runtime/director-cli/node_modules/zod/v3/types.js +3693 -0
- topview_3d_cli/_runtime/director-cli/package.json +6 -0
- topview_3d_cli/_runtime/director-cli/playwright.mjs +26 -0
- topview_3d_cli/_runtime/director-cli/render.mjs +336 -0
- topview_3d_cli/_runtime/director-cli/static/headless.html +124 -0
- topview_3d_cli/_runtime/director-cli/static/measure.mjs +61 -0
- topview_3d_cli/_runtime/director-cli/static/pose.mjs +71 -0
- topview_3d_cli/_runtime/director-cli/staticIntent.mjs +135 -0
- topview_3d_cli/_runtime/runtime.json +6 -0
- topview_3d_cli/bom.py +326 -0
- topview_3d_cli/contracts/director-v1/schema/director-document.schema.json +1097 -0
- topview_3d_cli/contracts/director-v1/schema/fcurves-compact-v1.schema.json +105 -0
- topview_3d_cli/director_camera_view.py +54 -0
- topview_3d_cli/director_document.py +793 -0
- topview_3d_cli/director_geometry.py +66 -0
- topview_3d_cli/director_operations.py +679 -0
- topview_3d_cli/director_static.py +134 -0
- topview_3d_cli/local_assets.py +248 -0
- topview_3d_cli/local_bom.py +108 -0
- topview_3d_cli/local_catalog.py +156 -0
- topview_3d_cli/local_cli.py +493 -0
- topview_3d_cli/local_edit.py +350 -0
- topview_3d_cli/local_errors.py +104 -0
- topview_3d_cli/local_inspect.py +302 -0
- topview_3d_cli/local_project.py +280 -0
- topview_3d_cli/local_read.py +139 -0
- topview_3d_cli/local_render.py +97 -0
- topview_3d_cli/node_batch.py +299 -0
- topview_3d_cli/renderer.py +75 -0
- topview_3d_cli/runtime.py +107 -0
- topview_3d_cli-0.1.0.dist-info/METADATA +48 -0
- topview_3d_cli-0.1.0.dist-info/RECORD +332 -0
- topview_3d_cli-0.1.0.dist-info/WHEEL +5 -0
- topview_3d_cli-0.1.0.dist-info/entry_points.txt +2 -0
- topview_3d_cli-0.1.0.dist-info/licenses/LICENSE +202 -0
- topview_3d_cli-0.1.0.dist-info/licenses/LICENSE-ASSETS +396 -0
- topview_3d_cli-0.1.0.dist-info/licenses/NOTICE +18 -0
- topview_3d_cli-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BufferAttribute,
|
|
3
|
+
BufferGeometry,
|
|
4
|
+
Color,
|
|
5
|
+
ColorManagement,
|
|
6
|
+
FileLoader,
|
|
7
|
+
Loader,
|
|
8
|
+
LinearSRGBColorSpace,
|
|
9
|
+
SRGBColorSpace,
|
|
10
|
+
InterleavedBuffer,
|
|
11
|
+
InterleavedBufferAttribute
|
|
12
|
+
} from 'three';
|
|
13
|
+
|
|
14
|
+
const _taskCache = new WeakMap();
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A loader for the Draco format.
|
|
18
|
+
*
|
|
19
|
+
* [Draco](https://google.github.io/draco/) is an open source library for compressing
|
|
20
|
+
* and decompressing 3D meshes and point clouds. Compressed geometry can be significantly smaller,
|
|
21
|
+
* at the cost of additional decoding time on the client device.
|
|
22
|
+
*
|
|
23
|
+
* Standalone Draco files have a `.drc` extension, and contain vertex positions, normals, colors,
|
|
24
|
+
* and other attributes. Draco files do not contain materials, textures, animation, or node hierarchies –
|
|
25
|
+
* to use these features, embed Draco geometry inside of a glTF file. A normal glTF file can be converted
|
|
26
|
+
* to a Draco-compressed glTF file using [glTF-Pipeline](https://github.com/CesiumGS/gltf-pipeline).
|
|
27
|
+
* When using Draco with glTF, an instance of `DRACOLoader` will be used internally by {@link GLTFLoader}.
|
|
28
|
+
*
|
|
29
|
+
* It is recommended to create one DRACOLoader instance and reuse it to avoid loading and creating
|
|
30
|
+
* multiple decoder instances.
|
|
31
|
+
*
|
|
32
|
+
* `DRACOLoader` will automatically use either the JS or the WASM decoding library, based on
|
|
33
|
+
* browser capabilities.
|
|
34
|
+
*
|
|
35
|
+
* ```js
|
|
36
|
+
* const loader = new DRACOLoader();
|
|
37
|
+
* loader.setDecoderPath( '/examples/jsm/libs/draco/' );
|
|
38
|
+
*
|
|
39
|
+
* const geometry = await dracoLoader.loadAsync( 'models/draco/bunny.drc' );
|
|
40
|
+
* geometry.computeVertexNormals(); // optional
|
|
41
|
+
*
|
|
42
|
+
* dracoLoader.dispose();
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @augments Loader
|
|
46
|
+
* @three_import import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';
|
|
47
|
+
*/
|
|
48
|
+
class DRACOLoader extends Loader {
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a new Draco loader.
|
|
52
|
+
*
|
|
53
|
+
* @param {LoadingManager} [manager] - The loading manager.
|
|
54
|
+
*/
|
|
55
|
+
constructor( manager ) {
|
|
56
|
+
|
|
57
|
+
super( manager );
|
|
58
|
+
|
|
59
|
+
this.decoderPath = '';
|
|
60
|
+
this.decoderConfig = {};
|
|
61
|
+
this.decoderBinary = null;
|
|
62
|
+
this.decoderPending = null;
|
|
63
|
+
|
|
64
|
+
this.workerLimit = 4;
|
|
65
|
+
this.workerPool = [];
|
|
66
|
+
this.workerNextTaskID = 1;
|
|
67
|
+
this.workerSourceURL = '';
|
|
68
|
+
|
|
69
|
+
this.defaultAttributeIDs = {
|
|
70
|
+
position: 'POSITION',
|
|
71
|
+
normal: 'NORMAL',
|
|
72
|
+
color: 'COLOR',
|
|
73
|
+
uv: 'TEX_COORD'
|
|
74
|
+
};
|
|
75
|
+
this.defaultAttributeTypes = {
|
|
76
|
+
position: 'Float32Array',
|
|
77
|
+
normal: 'Float32Array',
|
|
78
|
+
color: 'Float32Array',
|
|
79
|
+
uv: 'Float32Array'
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} path - The decoder path.
|
|
88
|
+
* @return {DRACOLoader} A reference to this loader.
|
|
89
|
+
*/
|
|
90
|
+
setDecoderPath( path ) {
|
|
91
|
+
|
|
92
|
+
this.decoderPath = path;
|
|
93
|
+
|
|
94
|
+
return this;
|
|
95
|
+
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins.
|
|
100
|
+
*
|
|
101
|
+
* @param {{type:('js'|'wasm')}} config - The decoder config.
|
|
102
|
+
* @return {DRACOLoader} A reference to this loader.
|
|
103
|
+
*/
|
|
104
|
+
setDecoderConfig( config ) {
|
|
105
|
+
|
|
106
|
+
this.decoderConfig = config;
|
|
107
|
+
|
|
108
|
+
return this;
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Sets the maximum number of Web Workers to be used during decoding.
|
|
114
|
+
* A lower limit may be preferable if workers are also for other tasks in the application.
|
|
115
|
+
*
|
|
116
|
+
* @param {number} workerLimit - The worker limit.
|
|
117
|
+
* @return {DRACOLoader} A reference to this loader.
|
|
118
|
+
*/
|
|
119
|
+
setWorkerLimit( workerLimit ) {
|
|
120
|
+
|
|
121
|
+
this.workerLimit = workerLimit;
|
|
122
|
+
|
|
123
|
+
return this;
|
|
124
|
+
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Starts loading from the given URL and passes the loaded Draco asset
|
|
129
|
+
* to the `onLoad()` callback.
|
|
130
|
+
*
|
|
131
|
+
* @param {string} url - The path/URL of the file to be loaded. This can also be a data URI.
|
|
132
|
+
* @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished.
|
|
133
|
+
* @param {onProgressCallback} onProgress - Executed while the loading is in progress.
|
|
134
|
+
* @param {onErrorCallback} onError - Executed when errors occur.
|
|
135
|
+
*/
|
|
136
|
+
load( url, onLoad, onProgress, onError ) {
|
|
137
|
+
|
|
138
|
+
const loader = new FileLoader( this.manager );
|
|
139
|
+
|
|
140
|
+
loader.setPath( this.path );
|
|
141
|
+
loader.setResponseType( 'arraybuffer' );
|
|
142
|
+
loader.setRequestHeader( this.requestHeader );
|
|
143
|
+
loader.setWithCredentials( this.withCredentials );
|
|
144
|
+
|
|
145
|
+
loader.load( url, ( buffer ) => {
|
|
146
|
+
|
|
147
|
+
this.parse( buffer, onLoad, onError );
|
|
148
|
+
|
|
149
|
+
}, onProgress, onError );
|
|
150
|
+
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Parses the given Draco data.
|
|
155
|
+
*
|
|
156
|
+
* @param {ArrayBuffer} buffer - The raw Draco data as an array buffer.
|
|
157
|
+
* @param {function(BufferGeometry)} onLoad - Executed when the loading/parsing process has been finished.
|
|
158
|
+
* @param {onErrorCallback} onError - Executed when errors occur.
|
|
159
|
+
*/
|
|
160
|
+
parse( buffer, onLoad, onError = ()=>{} ) {
|
|
161
|
+
|
|
162
|
+
this.decodeDracoFile( buffer, onLoad, null, null, SRGBColorSpace, onError ).catch( onError );
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
//
|
|
167
|
+
|
|
168
|
+
decodeDracoFile( buffer, callback, attributeIDs, attributeTypes, vertexColorSpace = LinearSRGBColorSpace, onError = () => {} ) {
|
|
169
|
+
|
|
170
|
+
const taskConfig = {
|
|
171
|
+
attributeIDs: attributeIDs || this.defaultAttributeIDs,
|
|
172
|
+
attributeTypes: attributeTypes || this.defaultAttributeTypes,
|
|
173
|
+
useUniqueIDs: !! attributeIDs,
|
|
174
|
+
vertexColorSpace: vertexColorSpace,
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
return this.decodeGeometry( buffer, taskConfig ).then( callback ).catch( onError );
|
|
178
|
+
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
decodeGeometry( buffer, taskConfig ) {
|
|
182
|
+
|
|
183
|
+
const taskKey = JSON.stringify( taskConfig );
|
|
184
|
+
|
|
185
|
+
// Check for an existing task using this buffer. A transferred buffer cannot be transferred
|
|
186
|
+
// again from this thread.
|
|
187
|
+
if ( _taskCache.has( buffer ) ) {
|
|
188
|
+
|
|
189
|
+
const cachedTask = _taskCache.get( buffer );
|
|
190
|
+
|
|
191
|
+
if ( cachedTask.key === taskKey ) {
|
|
192
|
+
|
|
193
|
+
return cachedTask.promise;
|
|
194
|
+
|
|
195
|
+
} else if ( buffer.byteLength === 0 ) {
|
|
196
|
+
|
|
197
|
+
// Technically, it would be possible to wait for the previous task to complete,
|
|
198
|
+
// transfer the buffer back, and decode again with the second configuration. That
|
|
199
|
+
// is complex, and I don't know of any reason to decode a Draco buffer twice in
|
|
200
|
+
// different ways, so this is left unimplemented.
|
|
201
|
+
throw new Error(
|
|
202
|
+
|
|
203
|
+
'THREE.DRACOLoader: Unable to re-decode a buffer with different ' +
|
|
204
|
+
'settings. Buffer has already been transferred.'
|
|
205
|
+
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
//
|
|
213
|
+
|
|
214
|
+
let worker;
|
|
215
|
+
const taskID = this.workerNextTaskID ++;
|
|
216
|
+
const taskCost = buffer.byteLength;
|
|
217
|
+
|
|
218
|
+
// Obtain a worker and assign a task, and construct a geometry instance
|
|
219
|
+
// when the task completes.
|
|
220
|
+
const geometryPending = this._getWorker( taskID, taskCost )
|
|
221
|
+
.then( ( _worker ) => {
|
|
222
|
+
|
|
223
|
+
worker = _worker;
|
|
224
|
+
|
|
225
|
+
return new Promise( ( resolve, reject ) => {
|
|
226
|
+
|
|
227
|
+
worker._callbacks[ taskID ] = { resolve, reject };
|
|
228
|
+
|
|
229
|
+
worker.postMessage( { type: 'decode', id: taskID, taskConfig, buffer }, [ buffer ] );
|
|
230
|
+
|
|
231
|
+
// this.debug();
|
|
232
|
+
|
|
233
|
+
} );
|
|
234
|
+
|
|
235
|
+
} )
|
|
236
|
+
.then( ( message ) => this._createGeometry( message.geometry ) );
|
|
237
|
+
|
|
238
|
+
// Remove task from the task list.
|
|
239
|
+
// Note: replaced '.finally()' with '.catch().then()' block - iOS 11 support (#19416)
|
|
240
|
+
geometryPending
|
|
241
|
+
.catch( () => true )
|
|
242
|
+
.then( () => {
|
|
243
|
+
|
|
244
|
+
if ( worker && taskID ) {
|
|
245
|
+
|
|
246
|
+
this._releaseTask( worker, taskID );
|
|
247
|
+
|
|
248
|
+
// this.debug();
|
|
249
|
+
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
} );
|
|
253
|
+
|
|
254
|
+
// Cache the task result.
|
|
255
|
+
_taskCache.set( buffer, {
|
|
256
|
+
|
|
257
|
+
key: taskKey,
|
|
258
|
+
promise: geometryPending
|
|
259
|
+
|
|
260
|
+
} );
|
|
261
|
+
|
|
262
|
+
return geometryPending;
|
|
263
|
+
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
_createGeometry( geometryData ) {
|
|
267
|
+
|
|
268
|
+
const geometry = new BufferGeometry();
|
|
269
|
+
|
|
270
|
+
if ( geometryData.index ) {
|
|
271
|
+
|
|
272
|
+
geometry.setIndex( new BufferAttribute( geometryData.index.array, 1 ) );
|
|
273
|
+
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
for ( let i = 0; i < geometryData.attributes.length; i ++ ) {
|
|
277
|
+
|
|
278
|
+
const { name, array, itemSize, stride, vertexColorSpace } = geometryData.attributes[ i ];
|
|
279
|
+
|
|
280
|
+
let attribute;
|
|
281
|
+
|
|
282
|
+
if ( itemSize === stride ) {
|
|
283
|
+
|
|
284
|
+
attribute = new BufferAttribute( array, itemSize );
|
|
285
|
+
|
|
286
|
+
} else {
|
|
287
|
+
|
|
288
|
+
const buffer = new InterleavedBuffer( array, stride );
|
|
289
|
+
|
|
290
|
+
attribute = new InterleavedBufferAttribute( buffer, itemSize, 0 );
|
|
291
|
+
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if ( name === 'color' ) {
|
|
295
|
+
|
|
296
|
+
this._assignVertexColorSpace( attribute, vertexColorSpace );
|
|
297
|
+
|
|
298
|
+
attribute.normalized = ( array instanceof Float32Array ) === false;
|
|
299
|
+
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
geometry.setAttribute( name, attribute );
|
|
303
|
+
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
return geometry;
|
|
307
|
+
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
_assignVertexColorSpace( attribute, inputColorSpace ) {
|
|
311
|
+
|
|
312
|
+
// While .drc files do not specify colorspace, the only 'official' tooling
|
|
313
|
+
// is PLY and OBJ converters, which use sRGB. We'll assume sRGB when a .drc
|
|
314
|
+
// file is passed into .load() or .parse(). GLTFLoader uses internal APIs
|
|
315
|
+
// to decode geometry, and vertex colors are already Linear-sRGB in there.
|
|
316
|
+
|
|
317
|
+
if ( inputColorSpace !== SRGBColorSpace ) return;
|
|
318
|
+
|
|
319
|
+
const _color = new Color();
|
|
320
|
+
|
|
321
|
+
for ( let i = 0, il = attribute.count; i < il; i ++ ) {
|
|
322
|
+
|
|
323
|
+
_color.fromBufferAttribute( attribute, i );
|
|
324
|
+
ColorManagement.colorSpaceToWorking( _color, SRGBColorSpace );
|
|
325
|
+
attribute.setXYZ( i, _color.r, _color.g, _color.b );
|
|
326
|
+
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
_loadLibrary( url, responseType ) {
|
|
332
|
+
|
|
333
|
+
const loader = new FileLoader( this.manager );
|
|
334
|
+
loader.setPath( this.decoderPath );
|
|
335
|
+
loader.setResponseType( responseType );
|
|
336
|
+
loader.setWithCredentials( this.withCredentials );
|
|
337
|
+
|
|
338
|
+
return new Promise( ( resolve, reject ) => {
|
|
339
|
+
|
|
340
|
+
loader.load( url, resolve, undefined, reject );
|
|
341
|
+
|
|
342
|
+
} );
|
|
343
|
+
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
preload() {
|
|
347
|
+
|
|
348
|
+
this._initDecoder();
|
|
349
|
+
|
|
350
|
+
return this;
|
|
351
|
+
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
_initDecoder() {
|
|
355
|
+
|
|
356
|
+
if ( this.decoderPending ) return this.decoderPending;
|
|
357
|
+
|
|
358
|
+
const useJS = typeof WebAssembly !== 'object' || this.decoderConfig.type === 'js';
|
|
359
|
+
const librariesPending = [];
|
|
360
|
+
|
|
361
|
+
if ( useJS ) {
|
|
362
|
+
|
|
363
|
+
librariesPending.push( this._loadLibrary( 'draco_decoder.js', 'text' ) );
|
|
364
|
+
|
|
365
|
+
} else {
|
|
366
|
+
|
|
367
|
+
librariesPending.push( this._loadLibrary( 'draco_wasm_wrapper.js', 'text' ) );
|
|
368
|
+
librariesPending.push( this._loadLibrary( 'draco_decoder.wasm', 'arraybuffer' ) );
|
|
369
|
+
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
this.decoderPending = Promise.all( librariesPending )
|
|
373
|
+
.then( ( libraries ) => {
|
|
374
|
+
|
|
375
|
+
const jsContent = libraries[ 0 ];
|
|
376
|
+
|
|
377
|
+
if ( ! useJS ) {
|
|
378
|
+
|
|
379
|
+
this.decoderConfig.wasmBinary = libraries[ 1 ];
|
|
380
|
+
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
const fn = DRACOWorker.toString();
|
|
384
|
+
|
|
385
|
+
const body = [
|
|
386
|
+
'/* draco decoder */',
|
|
387
|
+
jsContent,
|
|
388
|
+
'',
|
|
389
|
+
'/* worker */',
|
|
390
|
+
fn.substring( fn.indexOf( '{' ) + 1, fn.lastIndexOf( '}' ) )
|
|
391
|
+
].join( '\n' );
|
|
392
|
+
|
|
393
|
+
this.workerSourceURL = URL.createObjectURL( new Blob( [ body ] ) );
|
|
394
|
+
|
|
395
|
+
} );
|
|
396
|
+
|
|
397
|
+
return this.decoderPending;
|
|
398
|
+
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
_getWorker( taskID, taskCost ) {
|
|
402
|
+
|
|
403
|
+
return this._initDecoder().then( () => {
|
|
404
|
+
|
|
405
|
+
if ( this.workerPool.length < this.workerLimit ) {
|
|
406
|
+
|
|
407
|
+
const worker = new Worker( this.workerSourceURL );
|
|
408
|
+
|
|
409
|
+
worker._callbacks = {};
|
|
410
|
+
worker._taskCosts = {};
|
|
411
|
+
worker._taskLoad = 0;
|
|
412
|
+
|
|
413
|
+
worker.postMessage( { type: 'init', decoderConfig: this.decoderConfig } );
|
|
414
|
+
|
|
415
|
+
worker.onmessage = function ( e ) {
|
|
416
|
+
|
|
417
|
+
const message = e.data;
|
|
418
|
+
|
|
419
|
+
switch ( message.type ) {
|
|
420
|
+
|
|
421
|
+
case 'decode':
|
|
422
|
+
worker._callbacks[ message.id ].resolve( message );
|
|
423
|
+
break;
|
|
424
|
+
|
|
425
|
+
case 'error':
|
|
426
|
+
worker._callbacks[ message.id ].reject( message );
|
|
427
|
+
break;
|
|
428
|
+
|
|
429
|
+
default:
|
|
430
|
+
console.error( 'THREE.DRACOLoader: Unexpected message, "' + message.type + '"' );
|
|
431
|
+
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
this.workerPool.push( worker );
|
|
437
|
+
|
|
438
|
+
} else {
|
|
439
|
+
|
|
440
|
+
this.workerPool.sort( function ( a, b ) {
|
|
441
|
+
|
|
442
|
+
return a._taskLoad > b._taskLoad ? - 1 : 1;
|
|
443
|
+
|
|
444
|
+
} );
|
|
445
|
+
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
const worker = this.workerPool[ this.workerPool.length - 1 ];
|
|
449
|
+
worker._taskCosts[ taskID ] = taskCost;
|
|
450
|
+
worker._taskLoad += taskCost;
|
|
451
|
+
return worker;
|
|
452
|
+
|
|
453
|
+
} );
|
|
454
|
+
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
_releaseTask( worker, taskID ) {
|
|
458
|
+
|
|
459
|
+
worker._taskLoad -= worker._taskCosts[ taskID ];
|
|
460
|
+
delete worker._callbacks[ taskID ];
|
|
461
|
+
delete worker._taskCosts[ taskID ];
|
|
462
|
+
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
debug() {
|
|
466
|
+
|
|
467
|
+
console.log( 'Task load: ', this.workerPool.map( ( worker ) => worker._taskLoad ) );
|
|
468
|
+
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
dispose() {
|
|
472
|
+
|
|
473
|
+
for ( let i = 0; i < this.workerPool.length; ++ i ) {
|
|
474
|
+
|
|
475
|
+
this.workerPool[ i ].terminate();
|
|
476
|
+
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
this.workerPool.length = 0;
|
|
480
|
+
|
|
481
|
+
if ( this.workerSourceURL !== '' ) {
|
|
482
|
+
|
|
483
|
+
URL.revokeObjectURL( this.workerSourceURL );
|
|
484
|
+
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return this;
|
|
488
|
+
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/* WEB WORKER */
|
|
494
|
+
|
|
495
|
+
function DRACOWorker() {
|
|
496
|
+
|
|
497
|
+
let decoderConfig;
|
|
498
|
+
let decoderPending;
|
|
499
|
+
|
|
500
|
+
onmessage = function ( e ) {
|
|
501
|
+
|
|
502
|
+
const message = e.data;
|
|
503
|
+
|
|
504
|
+
switch ( message.type ) {
|
|
505
|
+
|
|
506
|
+
case 'init':
|
|
507
|
+
decoderConfig = message.decoderConfig;
|
|
508
|
+
decoderPending = new Promise( function ( resolve/*, reject*/ ) {
|
|
509
|
+
|
|
510
|
+
decoderConfig.onModuleLoaded = function ( draco ) {
|
|
511
|
+
|
|
512
|
+
// Module is Promise-like. Wrap before resolving to avoid loop.
|
|
513
|
+
resolve( { draco: draco } );
|
|
514
|
+
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
DracoDecoderModule( decoderConfig ); // eslint-disable-line no-undef
|
|
518
|
+
|
|
519
|
+
} );
|
|
520
|
+
break;
|
|
521
|
+
|
|
522
|
+
case 'decode':
|
|
523
|
+
const buffer = message.buffer;
|
|
524
|
+
const taskConfig = message.taskConfig;
|
|
525
|
+
decoderPending.then( ( module ) => {
|
|
526
|
+
|
|
527
|
+
const draco = module.draco;
|
|
528
|
+
const decoder = new draco.Decoder();
|
|
529
|
+
|
|
530
|
+
try {
|
|
531
|
+
|
|
532
|
+
const geometry = decodeGeometry( draco, decoder, new Int8Array( buffer ), taskConfig );
|
|
533
|
+
|
|
534
|
+
const buffers = geometry.attributes.map( ( attr ) => attr.array.buffer );
|
|
535
|
+
|
|
536
|
+
if ( geometry.index ) buffers.push( geometry.index.array.buffer );
|
|
537
|
+
|
|
538
|
+
self.postMessage( { type: 'decode', id: message.id, geometry }, buffers );
|
|
539
|
+
|
|
540
|
+
} catch ( error ) {
|
|
541
|
+
|
|
542
|
+
console.error( error );
|
|
543
|
+
|
|
544
|
+
self.postMessage( { type: 'error', id: message.id, error: error.message } );
|
|
545
|
+
|
|
546
|
+
} finally {
|
|
547
|
+
|
|
548
|
+
draco.destroy( decoder );
|
|
549
|
+
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
} );
|
|
553
|
+
break;
|
|
554
|
+
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
function decodeGeometry( draco, decoder, array, taskConfig ) {
|
|
560
|
+
|
|
561
|
+
const attributeIDs = taskConfig.attributeIDs;
|
|
562
|
+
const attributeTypes = taskConfig.attributeTypes;
|
|
563
|
+
|
|
564
|
+
let dracoGeometry;
|
|
565
|
+
let decodingStatus;
|
|
566
|
+
|
|
567
|
+
const geometryType = decoder.GetEncodedGeometryType( array );
|
|
568
|
+
|
|
569
|
+
if ( geometryType === draco.TRIANGULAR_MESH ) {
|
|
570
|
+
|
|
571
|
+
dracoGeometry = new draco.Mesh();
|
|
572
|
+
decodingStatus = decoder.DecodeArrayToMesh( array, array.byteLength, dracoGeometry );
|
|
573
|
+
|
|
574
|
+
} else if ( geometryType === draco.POINT_CLOUD ) {
|
|
575
|
+
|
|
576
|
+
dracoGeometry = new draco.PointCloud();
|
|
577
|
+
decodingStatus = decoder.DecodeArrayToPointCloud( array, array.byteLength, dracoGeometry );
|
|
578
|
+
|
|
579
|
+
} else {
|
|
580
|
+
|
|
581
|
+
throw new Error( 'THREE.DRACOLoader: Unexpected geometry type.' );
|
|
582
|
+
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
if ( ! decodingStatus.ok() || dracoGeometry.ptr === 0 ) {
|
|
586
|
+
|
|
587
|
+
throw new Error( 'THREE.DRACOLoader: Decoding failed: ' + decodingStatus.error_msg() );
|
|
588
|
+
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
const geometry = { index: null, attributes: [] };
|
|
592
|
+
|
|
593
|
+
// Gather all vertex attributes.
|
|
594
|
+
for ( const attributeName in attributeIDs ) {
|
|
595
|
+
|
|
596
|
+
const attributeType = self[ attributeTypes[ attributeName ] ];
|
|
597
|
+
|
|
598
|
+
let attribute;
|
|
599
|
+
let attributeID;
|
|
600
|
+
|
|
601
|
+
// A Draco file may be created with default vertex attributes, whose attribute IDs
|
|
602
|
+
// are mapped 1:1 from their semantic name (POSITION, NORMAL, ...). Alternatively,
|
|
603
|
+
// a Draco file may contain a custom set of attributes, identified by known unique
|
|
604
|
+
// IDs. glTF files always do the latter, and `.drc` files typically do the former.
|
|
605
|
+
if ( taskConfig.useUniqueIDs ) {
|
|
606
|
+
|
|
607
|
+
attributeID = attributeIDs[ attributeName ];
|
|
608
|
+
attribute = decoder.GetAttributeByUniqueId( dracoGeometry, attributeID );
|
|
609
|
+
|
|
610
|
+
} else {
|
|
611
|
+
|
|
612
|
+
attributeID = decoder.GetAttributeId( dracoGeometry, draco[ attributeIDs[ attributeName ] ] );
|
|
613
|
+
|
|
614
|
+
if ( attributeID === - 1 ) continue;
|
|
615
|
+
|
|
616
|
+
attribute = decoder.GetAttribute( dracoGeometry, attributeID );
|
|
617
|
+
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
const attributeResult = decodeAttribute( draco, decoder, dracoGeometry, attributeName, attributeType, attribute );
|
|
621
|
+
|
|
622
|
+
if ( attributeName === 'color' ) {
|
|
623
|
+
|
|
624
|
+
attributeResult.vertexColorSpace = taskConfig.vertexColorSpace;
|
|
625
|
+
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
geometry.attributes.push( attributeResult );
|
|
629
|
+
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
// Add index.
|
|
633
|
+
if ( geometryType === draco.TRIANGULAR_MESH ) {
|
|
634
|
+
|
|
635
|
+
geometry.index = decodeIndex( draco, decoder, dracoGeometry );
|
|
636
|
+
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
draco.destroy( dracoGeometry );
|
|
640
|
+
|
|
641
|
+
return geometry;
|
|
642
|
+
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
function decodeIndex( draco, decoder, dracoGeometry ) {
|
|
646
|
+
|
|
647
|
+
const numFaces = dracoGeometry.num_faces();
|
|
648
|
+
const numIndices = numFaces * 3;
|
|
649
|
+
const byteLength = numIndices * 4;
|
|
650
|
+
|
|
651
|
+
const ptr = draco._malloc( byteLength );
|
|
652
|
+
decoder.GetTrianglesUInt32Array( dracoGeometry, byteLength, ptr );
|
|
653
|
+
const index = new Uint32Array( draco.HEAPF32.buffer, ptr, numIndices ).slice();
|
|
654
|
+
draco._free( ptr );
|
|
655
|
+
|
|
656
|
+
return { array: index, itemSize: 1 };
|
|
657
|
+
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
function decodeAttribute( draco, decoder, dracoGeometry, attributeName, TypedArray, attribute ) {
|
|
661
|
+
|
|
662
|
+
const count = dracoGeometry.num_points();
|
|
663
|
+
const itemSize = attribute.num_components();
|
|
664
|
+
const dracoDataType = getDracoDataType( draco, TypedArray );
|
|
665
|
+
|
|
666
|
+
// Reference: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#data-alignment
|
|
667
|
+
const srcByteStride = itemSize * TypedArray.BYTES_PER_ELEMENT;
|
|
668
|
+
const dstByteStride = Math.ceil( srcByteStride / 4 ) * 4;
|
|
669
|
+
|
|
670
|
+
const dstStride = dstByteStride / TypedArray.BYTES_PER_ELEMENT;
|
|
671
|
+
|
|
672
|
+
const srcByteLength = count * srcByteStride;
|
|
673
|
+
const dstByteLength = count * dstByteStride;
|
|
674
|
+
|
|
675
|
+
const ptr = draco._malloc( srcByteLength );
|
|
676
|
+
decoder.GetAttributeDataArrayForAllPoints( dracoGeometry, attribute, dracoDataType, srcByteLength, ptr );
|
|
677
|
+
|
|
678
|
+
const srcArray = new TypedArray( draco.HEAPF32.buffer, ptr, srcByteLength / TypedArray.BYTES_PER_ELEMENT );
|
|
679
|
+
let dstArray;
|
|
680
|
+
|
|
681
|
+
if ( srcByteStride === dstByteStride ) {
|
|
682
|
+
|
|
683
|
+
// THREE.BufferAttribute
|
|
684
|
+
|
|
685
|
+
dstArray = srcArray.slice();
|
|
686
|
+
|
|
687
|
+
} else {
|
|
688
|
+
|
|
689
|
+
// THREE.InterleavedBufferAttribute
|
|
690
|
+
|
|
691
|
+
dstArray = new TypedArray( dstByteLength / TypedArray.BYTES_PER_ELEMENT );
|
|
692
|
+
|
|
693
|
+
let dstOffset = 0;
|
|
694
|
+
|
|
695
|
+
for ( let i = 0, il = srcArray.length; i < il; i ++ ) {
|
|
696
|
+
|
|
697
|
+
for ( let j = 0; j < itemSize; j ++ ) {
|
|
698
|
+
|
|
699
|
+
dstArray[ dstOffset + j ] = srcArray[ i * itemSize + j ];
|
|
700
|
+
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
dstOffset += dstStride;
|
|
704
|
+
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
draco._free( ptr );
|
|
710
|
+
|
|
711
|
+
return {
|
|
712
|
+
name: attributeName,
|
|
713
|
+
count: count,
|
|
714
|
+
itemSize: itemSize,
|
|
715
|
+
array: dstArray,
|
|
716
|
+
stride: dstStride
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
function getDracoDataType( draco, TypedArray ) {
|
|
722
|
+
|
|
723
|
+
switch ( TypedArray ) {
|
|
724
|
+
|
|
725
|
+
case Float32Array: return draco.DT_FLOAT32;
|
|
726
|
+
case Int8Array: return draco.DT_INT8;
|
|
727
|
+
case Int16Array: return draco.DT_INT16;
|
|
728
|
+
case Int32Array: return draco.DT_INT32;
|
|
729
|
+
case Uint8Array: return draco.DT_UINT8;
|
|
730
|
+
case Uint16Array: return draco.DT_UINT16;
|
|
731
|
+
case Uint32Array: return draco.DT_UINT32;
|
|
732
|
+
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
export { DRACOLoader };
|