小编sha*_*neo的帖子

Three.js - json 模型在屏幕上显得太大

我正在做 Three.js,我使用了一个 JSON 文件将其加载到 THREE.js 中,我的 JSON 文件是来自 clara.io 的狗。一切正常,问题是 3D 模型太大。有没有办法减少其加载到屏幕上的大小。

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>three.js webgl - loaders - JSON loader</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <style>
            body {
                font-family: Monospace;
                background-color: #000;
                color: #fff;
                margin: 0px;
                overflow: hidden;
            }
            #info {
                color: #fff;
                position: absolute;
                top: 10px;
                width: 100%;
                text-align: center;
                z-index: 100;
                display:block;
            }
            #info a, .button { color: #f00; font-weight: bold; text-decoration: underline; cursor: pointer }
        </style>
    </head>

    <body>

        <script src="three.js"></script> …
Run Code Online (Sandbox Code Playgroud)

javascript json three.js

1
推荐指数
1
解决办法
2037
查看次数

标签 统计

javascript ×1

json ×1

three.js ×1