THREE.Object3D:.eulerOrder现在是.rotation.order

时间:2018-05-03 18:01:32

标签: three.js

我设置{Object3D}.eulerOrder = 'YZX';,然后使用{Object3D}.rotation.set(...)旋转对象,我收到以下警告:" THREE.Object3D:.eulerOrder现在是.rotation.order。& #34;

我尝试将{Object3D}.rotation.order更改为所有不同的排列,但警告仍然存在。

https://jsfiddle.net/mocdo0h7/

1 个答案:

答案 0 :(得分:1)

对@ Mugen87的赞誉

回答:使用import random import time def time_analysis(func): def do_func(*args, **kwargs): print('[INFO] \'{}\' analysis started (N={}).'.format(func.__name__, len(args[0]))) start_time = time.clock() result = func(*args, **kwargs) end_time = time.clock() total_time = end_time - start_time print('[INFO] \'{}\' took {} seconds (N={}).'.format(func.__name__, total_time, len(args[0]))) return result return do_func @time_analysis def bubble_sort(num_list): num_len = len(num_list) for i in range(num_len - 1): for j in range(num_len - i - 1): if num_list[j] > num_list[j + 1]: num_list[j], num_list[j + 1] = num_list[j + 1], num_list[j] return num_list if __name__ == '__main__': N = 30000 random_list = list(range(N)) random.shuffle(random_list) bubble_sort(random_list) random_list = list(range(N)) random.shuffle(random_list) bubble_sort(random_list) 代替from multiprocessing import Pool, cpu_count from Sort import * def bubble_sort_parallel(*args, **kwargs): return bubble_sort(*args, **kwargs) if __name__ == '__main__': N = 30000 random_list = list(range(N)) random.shuffle(random_list) pool.apply_async(bubble_sort_parallel, (random_list,)) random_list = list(range(N)) random.shuffle(random_list) pool.apply_async(bubble_sort_parallel, (random_list,)) pool.close() pool.join()