From af13b23fd755b6828a8a814daf98a6cfcd3bc8de Mon Sep 17 00:00:00 2001 From: munrocket Date: Tue, 23 Jul 2019 19:43:50 +0400 Subject: [PATCH] misinformation in docs about modules --- docs/manual/en/introduction/Loading-3D-models.html | 9 +++------ docs/manual/zh/introduction/Loading-3D-models.html | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/manual/en/introduction/Loading-3D-models.html b/docs/manual/en/introduction/Loading-3D-models.html index ecccfdd682..938ee04453 100644 --- a/docs/manual/en/introduction/Loading-3D-models.html +++ b/docs/manual/en/introduction/Loading-3D-models.html @@ -92,13 +92,10 @@ // commonjs var THREE = window.THREE = require('three'); require('three/examples/js/loaders/GLTFLoader'); - -

- Currently three.js examples are not available as ES modules (import … from '…'). - Several workarounds are discussed in - #9562. -

+ // ES modules + import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'; +

Once you've imported a loader, you're ready to add a model to your scene. Syntax varies among diff --git a/docs/manual/zh/introduction/Loading-3D-models.html b/docs/manual/zh/introduction/Loading-3D-models.html index 471c8bc129..78c1fa6e88 100644 --- a/docs/manual/zh/introduction/Loading-3D-models.html +++ b/docs/manual/zh/introduction/Loading-3D-models.html @@ -79,13 +79,10 @@ // commonjs var THREE = window.THREE = require('three'); require('three/examples/js/loaders/GLTFLoader'); - -

- 目前three.js示例不能作为ES modules (import … from '…')来使用。 - 这里讨论了一些解决方法: - #9562. -

+ // ES modules + import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'; +

一旦你引入了一个加载器,你就已经准备好为场景添加模型了。不同加载器之间可能具有不同的语法 —— -- GitLab